package com.leeh.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.leeh.pojo.User;
import com.leeh.service.UserService;

@Controller
public class UserController {

	@Autowired
	private UserService userService;
	
	@RequestMapping(value = "/user", method = RequestMethod.GET)
	public String SaveUser(){
		User user = new User();
		user.setAge(24);
		user.setName("shixuan");
		userService.saveUser(user);
		return "index";
	}
}
